package com.gxm.base.grammar_运算语法.位移;

public class OperateDemo {
    public static void main(String[] args){
        //先++与后++的区别
        int i=1,a=0,b=0;
        a=i++;
        System.out.println(a+","+i);//先赋值再++
        i=1;
        a=++i;
        System.out.println(a+","+i);

        //异或 两边量互换
        int c = 5 ,d = 7;
        c=c^d;
        d=c^d;
        c=c^d;
        System.out.println("c="+c+",d="+d);
    }
}
